//
//  SXHBaseWebView.h
//  ZLZKBaseUtils
//
//  Created by sxh on 2020/12/9.
//

#import <UIKit/UIKit.h>
#import "DWKWebView.h"
#import "SXHBaseScriptMessage.h"

NS_ASSUME_NONNULL_BEGIN

@interface SXHBaseWebView : DWKWebView
<
    WKNavigationDelegate,
    WKUIDelegate
>

/*url为自定义协议时才能获取文件协议名和appid*/
///文件协议名
@property (nonatomic , strong , readonly) NSString *agreement;
///appid
@property (nonatomic , strong , readonly) NSString *appid;
/// 注入页面的数据
@property (nonatomic , strong) NSMutableDictionary *params;

/// 初始化wkwebview
/// @param frame frame
/// @param configuration wkwebview配置项
- (instancetype)initWithFrame:(CGRect)frame
                configuration:(WKWebViewConfiguration *)configuration;


/// 加载h5
/// @param url 加载地址
- (void)loadingUrl:(NSString *)url;

@property (nullable, nonatomic, weak) id <WKNavigationDelegate> sxhNavigationDelegate;
@property (nullable, nonatomic, weak) id <SXHBaseScriptMessageDelegate> delegate;

@end

NS_ASSUME_NONNULL_END
